$(function(){
	//alert("dsafasdf");
	var count = 1;
	
	$("#add").click(function() {
		//alert(count);
		if(count < 4) {
			$("#objTable").append('<tr id=tr'+count+'><td>第'+count+'工序:&nbsp;&nbsp;<input  style="width: 60%" type="text" name=process'+count+' /></td></tr>');
			count++;
			$("#del").css({display: "block"});
		}
		if(count == 4) {
			$("#add").css({display: "none"});
		}
	});
	$("#del").click(function() {
		var i = count - 1;
		//alert("del" + i);
		$("#tr"+i).remove();
		$("#add").css({display: "block"});
		count--;
		if(count == 1) {
			$("#del").css({display: "none"});
		}
	});
});
